<?php

namespace App\Http\Controllers\home;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use DB;
class YidongController extends Controller
{
    public function index()
    {
        $list = null;
    	$li = DB::table('yidong')->get();
        foreach ($li as $k => $v) {
            if (!$v->phone==null) {
                $list[] = $v->phone;
            }
        }
    	return view('home.yidong.index',['list'=>$list]);
    }
    public function create()
    {
        $list = null;
    	$li = DB::table('yidong')->get();
        foreach ($li as $k => $v) {
            if (!$v->pad==null) {
                $list[] = $v->pad;
            }
        }
    	// dd($list);
    	return view('home.yidong.pad',['list'=>$list]);
    }
    public function show()
    {
        $list = null;
    	$li = DB::table('yidong')->get();
        foreach ($li as $k => $v) {
            if (!$v->other==null) {
                $list[] = $v->other;
            }
        }
    	// dd($list);
    	return view('home.yidong.other',['list'=>$list]);
    }
}
